.ui-modal {
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(48, 44, 80, 0.9);
  z-index: 99999; /* Move to token */
  opacity: 0;
  visibility: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 120ms ease-in-out;
  pointer-events: none;
}

.ui-modal--open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.ui-modal__modal {
  width: 100%;
  max-height: 100%;
  background-color: var(--white);
  flex-grow: 0;
  overflow-y: scroll;
  transform: translateY(20px);
  opacity: 0;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1) 120ms;

  @media screen and (min-width: 768px) {
    min-width: 620px;
    max-width: 620px;
    max-height: calc(100% - 96px);
    border-radius: 4px;
    box-shadow: 0 14px 25px rgba(48, 44, 80, 0.5);
  }
}

.ui-modal--open .ui-modal__modal {
  transform: translateY(0);
  opacity: 1;
}

.ui-modal__modal__header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--grey100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--white);

  @media screen and (min-width: 768px) {
    padding: 40px 32px 32px;
  }
}

.ui-modal__modal__header--fixed {
  position: sticky;
  top: 0;
}

.ui-modal__modal__footer {
  padding: 24px;
  background-color: var(--white);

  @media screen and (min-width: 768px) {
    padding: 32px;
  }
}

.ui-modal__modal__footer--fixed {
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--grey100);
}

.ui-modal__modal__main {
  padding: 24px;

  @media screen and (min-width: 768px) {
    padding: 32px;
  }
}
